<?php
/**
 * undocumented RDF
 *
 * @package Converters
 * @author Keith
 **/
class RDF extends ConvertableObject
{
	/**
	 * returns a Triples object
	 *
	 * @return object Triples
	 * @author Keith Alexander
	 **/
	public function to_triples($rdf, $base='')
	{
		$parser = ARC2::getRDFParser(); 
		$parser->parse($base, trim($rdf)); 
		$triples = $parser->getTriples();
		$Triples = new Triples();
		$Triples->set_value($triples);
		return $Triples;
	}
	
	/**
	 * returns a GraphIndex object
	 *
	 * @return object GraphIndex
	 * @author Keith Alexander
	 **/
	public function to_resources($rdfxml, $base='')
	{
		$Triples = RDFXML::to_triples($rdfxml, $base);
		$Triples->set_container($this->containerObject);
		return $Triples->to_resources(false);
	}
	
	
} // END class 

?>